DROP TABLE CRST_RCV_SHIPMENT_HEADERS;

CREATE TABLE CRST_RCV_SHIPMENT_HEADERS
(
  SHIPMENT_HEADER_ID        NUMBER              NOT NULL,
  LAST_UPDATE_DATE          DATE                NOT NULL,
  LAST_UPDATED_BY           NUMBER              NOT NULL,
  CREATION_DATE             DATE                NOT NULL,
  CREATED_BY                NUMBER              NOT NULL,
  LAST_UPDATE_LOGIN         NUMBER,
  RECEIPT_SOURCE_CODE       VARCHAR2(25 BYTE)   NOT NULL,
  VENDOR_ID                 NUMBER,
  VENDOR_SITE_ID            NUMBER,
  ORGANIZATION_ID           NUMBER,
  SHIPMENT_NUM              VARCHAR2(30 BYTE),
  RECEIPT_NUM               VARCHAR2(30 BYTE),
  SHIP_TO_LOCATION_ID       NUMBER,
  BILL_OF_LADING            VARCHAR2(25 BYTE),
  PACKING_SLIP              VARCHAR2(25 BYTE),
  SHIPPED_DATE              DATE,
  FREIGHT_CARRIER_CODE      VARCHAR2(25 BYTE),
  EXPECTED_RECEIPT_DATE     DATE,
  EMPLOYEE_ID               NUMBER(9),
  NUM_OF_CONTAINERS         NUMBER,
  WAYBILL_AIRBILL_NUM       VARCHAR2(20 BYTE),
  COMMENTS                  VARCHAR2(240 BYTE),
  ATTRIBUTE_CATEGORY        VARCHAR2(30 BYTE),
  ATTRIBUTE1                VARCHAR2(150 BYTE),
  ATTRIBUTE2                VARCHAR2(150 BYTE),
  ATTRIBUTE3                VARCHAR2(150 BYTE),
  ATTRIBUTE4                VARCHAR2(150 BYTE),
  ATTRIBUTE5                VARCHAR2(150 BYTE),
  ATTRIBUTE6                VARCHAR2(150 BYTE),
  ATTRIBUTE7                VARCHAR2(150 BYTE),
  ATTRIBUTE8                VARCHAR2(150 BYTE),
  ATTRIBUTE9                VARCHAR2(150 BYTE),
  ATTRIBUTE10               VARCHAR2(150 BYTE),
  ATTRIBUTE11               VARCHAR2(150 BYTE),
  ATTRIBUTE12               VARCHAR2(150 BYTE),
  ATTRIBUTE13               VARCHAR2(150 BYTE),
  ATTRIBUTE14               VARCHAR2(150 BYTE),
  ATTRIBUTE15               VARCHAR2(150 BYTE),
  USSGL_TRANSACTION_CODE    VARCHAR2(30 BYTE),
  GOVERNMENT_CONTEXT        VARCHAR2(30 BYTE),
  REQUEST_ID                NUMBER,
  PROGRAM_APPLICATION_ID    NUMBER,
  PROGRAM_ID                NUMBER,
  PROGRAM_UPDATE_DATE       DATE,
  ASN_TYPE                  VARCHAR2(25 BYTE),
  EDI_CONTROL_NUM           VARCHAR2(10 BYTE),
  NOTICE_CREATION_DATE      DATE,
  GROSS_WEIGHT              NUMBER,
  GROSS_WEIGHT_UOM_CODE     VARCHAR2(3 BYTE),
  NET_WEIGHT                NUMBER,
  NET_WEIGHT_UOM_CODE       VARCHAR2(3 BYTE),
  TAR_WEIGHT                NUMBER,
  TAR_WEIGHT_UOM_CODE       VARCHAR2(3 BYTE),
  PACKAGING_CODE            VARCHAR2(5 BYTE),
  CARRIER_METHOD            VARCHAR2(2 BYTE),
  CARRIER_EQUIPMENT         VARCHAR2(10 BYTE),
  CARRIER_EQUIPMENT_NUM     VARCHAR2(10 BYTE),
  CARRIER_EQUIPMENT_ALPHA   VARCHAR2(10 BYTE),
  SPECIAL_HANDLING_CODE     VARCHAR2(3 BYTE),
  HAZARD_CODE               VARCHAR2(1 BYTE),
  HAZARD_CLASS              VARCHAR2(4 BYTE),
  HAZARD_DESCRIPTION        VARCHAR2(80 BYTE),
  FREIGHT_TERMS             VARCHAR2(25 BYTE),
  FREIGHT_BILL_NUMBER       VARCHAR2(35 BYTE),
  INVOICE_NUM               VARCHAR2(50 BYTE),
  INVOICE_DATE              DATE,
  INVOICE_AMOUNT            NUMBER,
  TAX_NAME                  VARCHAR2(15 BYTE),
  TAX_AMOUNT                NUMBER,
  FREIGHT_AMOUNT            NUMBER,
  INVOICE_STATUS_CODE       VARCHAR2(25 BYTE),
  ASN_STATUS                VARCHAR2(10 BYTE),
  CURRENCY_CODE             VARCHAR2(15 BYTE),
  CONVERSION_RATE_TYPE      VARCHAR2(30 BYTE),
  CONVERSION_RATE           NUMBER,
  CONVERSION_DATE           DATE,
  PAYMENT_TERMS_ID          NUMBER,
  MRC_CONVERSION_RATE_TYPE  VARCHAR2(2000 BYTE),
  MRC_CONVERSION_DATE       VARCHAR2(2000 BYTE),
  MRC_CONVERSION_RATE       VARCHAR2(2000 BYTE),
  SHIP_TO_ORG_ID            NUMBER,
  CUSTOMER_ID               NUMBER,
  CUSTOMER_SITE_ID          NUMBER,
  SHIPMENT_HEADER_ID_N      NUMBER 
);
